{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "# numpy 用于快速计算任何维度的数组\n",
    "\n",
    "# 支持常见的数组和矩阵操作\n",
    "\n",
    "# 使用ndarray对象来处理多维数组"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "pycharm": {
     "is_executing": false
    }
   },
   "outputs": [],
   "source": [
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "pycharm": {
     "is_executing": false
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": "array([[87, 46, 61, 80, 43],\n       [80, 91, 80, 80, 45],\n       [40, 91, 55, 66, 50],\n       [91, 61, 74, 55, 78],\n       [49, 72, 74, 88, 51],\n       [52, 80, 91, 60, 74],\n       [48, 65, 68, 90, 69],\n       [74, 82, 49, 75, 91],\n       [84, 45, 71, 92, 83],\n       [63, 64, 65, 74, 68]])"
     },
     "metadata": {},
     "output_type": "execute_result",
     "execution_count": 2
    }
   ],
   "source": [
    "# 生成10名同学，5门功课的数据\n",
    "score=np.random.randint(low=40,high=100,size=(10,5))\n",
    "score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "outputs": [],
   "source": [
    "# 取出最后四人的成绩\n",
    "test_score=score[6:,:]"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n",
     "is_executing": false
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "outputs": [
    {
     "data": {
      "text/plain": "array([[74, 65, 68, 83, 50],\n       [58, 46, 42, 70, 77],\n       [62, 42, 40, 73, 91],\n       [65, 59, 66, 62, 58]])"
     },
     "metadata": {},
     "output_type": "execute_result",
     "execution_count": 6
    }
   ],
   "source": [
    "test_score"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n",
     "is_executing": false
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "outputs": [],
   "source": [
    "arr=test_score>60"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n",
     "is_executing": false
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "outputs": [],
   "source": [
    "# 直接修改的就是test_score,不是新生成\n",
    "test_score[test_score>60]=1\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n",
     "is_executing": false
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "outputs": [
    {
     "data": {
      "text/plain": "False"
     },
     "metadata": {},
     "output_type": "execute_result",
     "execution_count": 12
    }
   ],
   "source": [
    "all_good=np.all(test_score>60)\n",
    "all_good"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n",
     "is_executing": false
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "outputs": [
    {
     "data": {
      "text/plain": "True"
     },
     "metadata": {},
     "output_type": "execute_result",
     "execution_count": 17
    }
   ],
   "source": [
    "all=np.all(score>=40)\n",
    "all"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n",
     "is_executing": false
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "outputs": [
    {
     "data": {
      "text/plain": "True"
     },
     "metadata": {},
     "output_type": "execute_result",
     "execution_count": 19
    }
   ],
   "source": [
    "any=np.any(score==40)\n",
    "any"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n",
     "is_executing": false
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "outputs": [],
   "source": [
    "# 判断前四名学生,前四门课程中，成绩中大于60的置为1，否则为0\n",
    "test_score=score[:4,:4]"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n",
     "is_executing": false
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "outputs": [
    {
     "data": {
      "text/plain": "array([[87, 46, 61, 80],\n       [80, 91, 80, 80],\n       [40, 91, 55, 66],\n       [91, 61, 74, 55]])"
     },
     "metadata": {},
     "output_type": "execute_result",
     "execution_count": 4
    }
   ],
   "source": [
    "tmp=np.where(test_score>60,1,0) \n",
    "test_score"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n",
     "is_executing": false
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "outputs": [
    {
     "data": {
      "text/plain": "array([[1, 0, 1, 1],\n       [1, 0, 1, 1],\n       [0, 0, 0, 1],\n       [0, 1, 1, 0]])"
     },
     "metadata": {},
     "output_type": "execute_result",
     "execution_count": 5
    }
   ],
   "source": [
    "# 判断前四名学生,前四门课程中，成绩中大于60且小于90的换为1，否则为0\n",
    "\n",
    "data=np.where(np.logical_and(test_score>60,test_score<90),1,0)\n",
    "data"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n",
     "is_executing": false
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "outputs": [
    {
     "data": {
      "text/plain": "array([[0, 1, 0, 0],\n       [0, 1, 0, 0],\n       [1, 1, 1, 0],\n       [1, 0, 0, 1]])"
     },
     "metadata": {},
     "output_type": "execute_result",
     "execution_count": 7
    }
   ],
   "source": [
    "# 判断前四名学生,前四门课程中，成绩中大于90或小于60的换为1，否则为0\n",
    "data=np.where(np.logical_or(test_score>90,test_score<60),1,0)\n",
    "data"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n",
     "is_executing": false
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "outputs": [
    {
     "data": {
      "text/plain": "40"
     },
     "metadata": {},
     "output_type": "execute_result",
     "execution_count": 14
    }
   ],
   "source": [
    "np.min(test_score)\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n",
     "is_executing": false
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "outputs": [
    {
     "data": {
      "text/plain": "91"
     },
     "metadata": {},
     "output_type": "execute_result",
     "execution_count": 13
    }
   ],
   "source": [
    "np.max(test_score)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n",
     "is_executing": false
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "outputs": [
    {
     "data": {
      "text/plain": "71.125"
     },
     "metadata": {},
     "output_type": "execute_result",
     "execution_count": 15
    }
   ],
   "source": [
    "np.mean(test_score)\n",
    "\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n",
     "is_executing": false
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "outputs": [
    {
     "data": {
      "text/plain": "16.03073220411345"
     },
     "metadata": {},
     "output_type": "execute_result",
     "execution_count": 16
    }
   ],
   "source": [
    "# 标准差\n",
    "np.std(test_score)\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n",
     "is_executing": false
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "outputs": [
    {
     "data": {
      "text/plain": "256.984375"
     },
     "metadata": {},
     "output_type": "execute_result",
     "execution_count": 29
    }
   ],
   "source": [
    "# 方差\n",
    "np.var(test_score)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n",
     "is_executing": false
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "outputs": [
    {
     "data": {
      "text/plain": "array([3, 1, 1, 0], dtype=int64)"
     },
     "metadata": {},
     "output_type": "execute_result",
     "execution_count": 30
    }
   ],
   "source": [
    "# 最大元素下标\n",
    "np.argmax(test_score,axis=0)\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n",
     "is_executing": false
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "outputs": [
    {
     "data": {
      "text/plain": "array([2, 0, 2, 3], dtype=int64)"
     },
     "metadata": {},
     "output_type": "execute_result",
     "execution_count": 33
    }
   ],
   "source": [
    "# 最小元素下标\n",
    "np.argmin(test_score,axis=0)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n",
     "is_executing": false
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "outputs": [
    {
     "data": {
      "text/plain": "array([[87, 46, 61, 80]])"
     },
     "metadata": {},
     "output_type": "execute_result",
     "execution_count": 21
    }
   ],
   "source": [
    "np.median(test_score,axis=0)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n",
     "is_executing": false
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "outputs": [
    {
     "data": {
      "text/plain": "(10,)"
     },
     "metadata": {},
     "output_type": "execute_result",
     "execution_count": 48
    }
   ],
   "source": [
    "stock_low_price=np.array([7.18, 8.75, 8.24, 7.9 , 7.71, 7.43, 7.15, 7.01, 6.97, 6.9 ])\n",
    "stock_low_price.shape"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n",
     "is_executing": false
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "outputs": [
    {
     "data": {
      "text/plain": "6.9"
     },
     "metadata": {},
     "output_type": "execute_result",
     "execution_count": 52
    }
   ],
   "source": [
    "lowest=np.min(stock_low_price,axis=0)\n",
    "lowest"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n",
     "is_executing": false
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "outputs": [
    {
     "data": {
      "text/plain": "9"
     },
     "metadata": {},
     "output_type": "execute_result",
     "execution_count": 53
    }
   ],
   "source": [
    "lowest_index=np.argmin(stock_low_price,axis=0)\n",
    "lowest_index"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n",
     "is_executing": false
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "outputs": [
    {
     "data": {
      "text/plain": "numpy.int64"
     },
     "metadata": {},
     "output_type": "execute_result",
     "execution_count": 46
    }
   ],
   "source": [
    "type(lowest_index)\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n",
     "is_executing": false
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "outputs": [
    {
     "data": {
      "text/plain": "numpy.float64"
     },
     "metadata": {},
     "output_type": "execute_result",
     "execution_count": 43
    }
   ],
   "source": [
    "type(lowest)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n",
     "is_executing": false
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "outputs": [
    {
     "data": {
      "text/plain": "46"
     },
     "metadata": {},
     "output_type": "execute_result",
     "execution_count": 24
    }
   ],
   "source": [
    "line_score=test_score[:1,:]\n",
    "line_score"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n",
     "is_executing": false
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "outputs": [
    {
     "data": {
      "text/plain": "46"
     },
     "metadata": {},
     "output_type": "execute_result",
     "execution_count": 27
    }
   ],
   "source": [
    "np.min(line_score)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n",
     "is_executing": false
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "# 这个axis=1表示行\n",
    "np.min(line_score,axis=1)[0]"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "outputs": [
    {
     "data": {
      "text/plain": "array([87, 46, 61, 80])"
     },
     "metadata": {},
     "output_type": "execute_result",
     "execution_count": 28
    }
   ],
   "source": [
    "np.min(line_score,axis=0)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n",
     "is_executing": false
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "pycharm": {
     "is_executing": false
    }
   },
   "outputs": [],
   "source": [
    "\n",
    "\n",
    "score=np.array(\n",
    "[[80, 89, 86, 67, 79],\n",
    "       [78, 97, 89, 67, 81],\n",
    "       [90, 94, 78, 67, 74],\n",
    "       [91, 91, 90, 67, 69],\n",
    "       [76, 87, 75, 67, 86],\n",
    "       [70, 79, 84, 67, 84],\n",
    "       [94, 92, 93, 67, 64],\n",
    "       [86, 85, 83, 67, 80]])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[80, 89, 86, 67, 79],\n",
       "       [78, 97, 89, 67, 81],\n",
       "       [90, 94, 78, 67, 74],\n",
       "       [91, 91, 90, 67, 69],\n",
       "       [76, 87, 75, 67, 86],\n",
       "       [70, 79, 84, 67, 84],\n",
       "       [94, 92, 93, 67, 64],\n",
       "       [86, 85, 83, 67, 80]])"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[80, 89, 86, 67, 79],\n",
       "       [78, 97, 89, 67, 81],\n",
       "       [90, 94, 78, 67, 74],\n",
       "       [91, 91, 90, 67, 69],\n",
       "       [76, 87, 75, 67, 86],\n",
       "       [70, 79, 84, 67, 84],\n",
       "       [94, 92, 93, 67, 64],\n",
       "       [86, 85, 83, 67, 80]])"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# ndarray和python 原生list效率高\n",
    "# 大量计算的时候,ndarray有非常大的优势\n",
    "# 1是因为数组连续空间,可以快速寻址,\n",
    "# 2是因为支持并行化运算\n",
    "# 3是因为底层用c实现,内部解除了GIL(全局解释器锁)\n",
    "score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Wall time: 447 ms\n",
      "Wall time: 141 ms\n"
     ]
    }
   ],
   "source": [
    "import random\n",
    "import time \n",
    "a=[]\n",
    "for i in range(100000000):\n",
    "    a.append(random.random())\n",
    "    pass\n",
    "%time sum1= sum(a)\n",
    "\n",
    "b=np.array(a)\n",
    "\n",
    "%time sum2=np.sum(b)\n",
    "\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(8, 5)"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\"\"\"\n",
    "属性名字\t属性解释\n",
    "ndarray.shape\t数组维度的元组\n",
    "ndarray.ndim\t数组维数\n",
    "ndarray.size\t数组中的元素数量\n",
    "ndarray.itemsize\t一个数组元素的长度（字节）\n",
    "ndarray.dtype\t数组元素的类型\n",
    "\"\"\"\n",
    "# score\n",
    "score.shape\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "score.ndim "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "40"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "score.size\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "4"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\n",
    "score.itemsize\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "dtype('int32')"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\n",
    "score.dtype"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "numpy.dtype"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(score.dtype)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "dtype('float32')"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a=np.array([[1,2,3],[4,5,6]],dtype=np.float32)\n",
    "a.dtype"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([b'python', b'tensorflow', b'scikit-learn', b'numpy'], dtype='|S12')"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "arr=np.array(['python', 'tensorflow', 'scikit-learn', 'numpy'],dtype=np.string_)\n",
    "arr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[1, 1, 1, 1, 1, 1, 1, 1],\n",
       "       [1, 1, 1, 1, 1, 1, 1, 1],\n",
       "       [1, 1, 1, 1, 1, 1, 1, 1],\n",
       "       [1, 1, 1, 1, 1, 1, 1, 1]], dtype=int64)"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 生成0 或者1的数组 4行8列\n",
    "ones=np.ones([4,8],dtype=np.int64)\n",
    "ones"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[0, 0, 0, 0],\n",
       "       [0, 0, 0, 0],\n",
       "       [0, 0, 0, 0],\n",
       "       [0, 0, 0, 0],\n",
       "       [0, 0, 0, 0],\n",
       "       [0, 0, 0, 0],\n",
       "       [0, 0, 0, 0],\n",
       "       [0, 0, 0, 0]], dtype=int64)"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "zeros=np.zeros([8,4],dtype=np.int64)\n",
    "zeros"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [],
   "source": [
    "\n",
    "# 从现有数组中生成\n",
    "a=np.array([[1,2,3],[4,5,6]],dtype=np.int64)\n",
    "# 深拷贝\n",
    "a1=np.array(a)\n",
    "a1==a\n",
    "# 浅拷贝\n",
    "a2=np.asarray(a)\n",
    "a[0,0]=100"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[1, 2, 3],\n",
       "       [4, 5, 6]], dtype=int64)"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[100,   2,   3],\n",
       "       [  4,   5,   6]], dtype=int64)"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([  0,  10,  20,  30,  40,  50,  60,  70,  80,  90, 100], dtype=int64)"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 生成固定范围的数组 \n",
    "\n",
    "arr=np.linspace(0,100,num=11,endpoint=True,dtype=np.int64)\n",
    "arr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "dtype('int64')"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\n",
    "arr.dtype"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42,\n",
       "       44, 46, 48])"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 创建等差数列\n",
    "arr=np.arange(10,50,2)\n",
    "arr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 10,  31, 100], dtype=int64)"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 创建等比数列 在10 ^ start 到10 ^ stop中创建num个等比数列\n",
    "arr=np.logspace(1,2,num=3,dtype=np.int64)\n",
    "arr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([2.25982624, 0.82582712, 2.6214011 , ..., 1.75462086, 2.46695192,\n",
       "       1.64078531])"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# np.random模块\n",
    "# 生成均值为1.75，标准差为1的正态分布数据，100000000个\n",
    "x1=np.random.normal(loc=1.75,scale=1,size=100000000)\n",
    "x1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "dtype('float64')"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x1.size\n",
    "x1.shape\n",
    "x1.dtype"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "import random\n",
    "from pylab import mpl\n",
    "\n",
    "# 设置显示中文字体\n",
    "mpl.rcParams[\"font.sans-serif\"] = [\"SimHei\"]\n",
    "# 设置正常显示符号\n",
    "mpl.rcParams[\"axes.unicode_minus\"] = False\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAABlgAAAKJCAYAAADX3STUAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAPYQAAD2EBqD+naQAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF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Odh4GpaquTfL9mQQrjyf5hSR/WlXf2lpr+7m2gGUBpvsyn6Gq3p/kkdba5pJLAhbkXPf7lqr67iRvS3KtZcYwOKeTnNpx7stJLkkiYIEB0q7DKPxSPLfDWFye5NOtteNJ0lo7XVWPJnlNt2UBC/AjSX63tfbXSVJVv5hJv/7qJH+3nwsLWJbrR5N8dVU9Oz2+JMkPT5OyWzqsC1iAqvrGJL+Tyey3x7uuB5i740kO7zh3MMlXOqgFWDDtOoyG53YYj//ImTtSfEOST3VQC7BYB5K8atvxwUxWsF00jwuzPN+Rl/6b/0qSh5N8tJNqgIWpqlck+USSjyf54+nerknypf0uPQRWxiNJfnLroKrWk1ycl24RCAyAdh1GxXM7jMdmkl+vqrdl0s7fmMkL7z/ZaVXAIvxlko9U1TuTPJnJs/yTmbxLdV8ELEvUWvvC9uOqej7J0621pzsqCVic65NcOf3zlm3nX5PkWBcFAXP3YJK1qrq5tfbbSTaSPNBae7HjuoD5067DSHhuh/GYvnfle5LckeSDSf4ryU2ttWOdFgYswu8leV2SdyT5uiSPJblxHtv+lglXAAB7U1U3JLknyXOZLC2+rrX2j91WBQAAACyDgAUAYB+q6rIk1yR5qLX2VNf1AAAAAMshYAEAAAAAAJjRy7ouAAAAAAAAoG8ELAAAAAAAADMSsAAAAAAAAMxIwAIAAAAAADAjAQsAAAAAAMCMBCwAAAAAAAAzErAAAAAAAADMSMACAAAAAAAwIwELAAAAAADAjP4XRaH3ln1m3OsAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 2000x800 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.figure(figsize=(20, 8), dpi=100)\n",
    "plt.hist(x1,1000)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-0.47746571,  0.81495481,  1.40721735, -0.3114108 ,  0.91826355],\n",
       "       [ 0.03619636, -0.45585402, -1.51461796, -0.84590868,  1.51598865],\n",
       "       [-0.24409251,  0.05924792, -1.11122599,  1.16979526, -0.53175093],\n",
       "       [ 0.80057009, -0.85908903,  1.41863807, -1.02650992, -0.80968626]])"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 举例2：随机生成4支股票1周的交易日涨幅数据\n",
    "# 4支股票，一周(5天)的涨跌幅数据，如何获取？\n",
    "# \n",
    "# 随机生成涨跌幅在某个正态分布内，比如均值0，方差1\n",
    "\n",
    "stock_change =np.random.normal(loc=0,scale=1,size=(4,5))\n",
    "stock_change"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1.74149289, 3.11570679, 1.26361683, 1.24489679, 1.04555096])"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 均匀分布\n",
    "x2=np.random.uniform(low=1,high=5,size=5)\n",
    "x2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[1.33190731, 3.98820742, 4.54279813, 4.55297676, 2.02842179],\n",
       "       [2.86545997, 3.3856187 , 2.30516907, 3.58819338, 1.86825746],\n",
       "       [3.69198337, 4.00016803, 1.8483927 , 1.41538541, 2.55443199],\n",
       "       [1.43970841, 4.30781299, 4.14162408, 1.68498339, 3.99760873]])"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 做了一个软件炒股\n",
    "x3=np.random.uniform(low=1,high=5,size=(4,5))\n",
    "x3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[2, 4, 1, 1, 2, 2],\n",
       "       [1, 2, 4, 3, 1, 3],\n",
       "       [4, 3, 2, 4, 3, 2],\n",
       "       [3, 1, 4, 2, 4, 1],\n",
       "       [1, 4, 4, 4, 4, 2]], dtype=int64)"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x4=np.random.randint(low=1,high=5,size=(5,6),dtype=np.int64)\n",
    "x4"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "pycharm": {
     "is_executing": true,
     "name": "#%%\n"
    }
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 0.2991617 , -0.02312535,  0.66857048, ...,  0.12552041,\n",
       "        0.72189231, -0.17435933])"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import numpy as np\n",
    "# 生成均匀分布的随机数\n",
    "x2 = np.random.uniform(-1, 1, 1000000)\n",
    "\n",
    "x2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAABlIAAAKLCAYAAACNNxUWAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAPYQAAD2EBqD+naQAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzs3X3MdOldF/Dvryy7Fthd1oSy4ha2RmnKS1yFFtoQaqKtGIiR+IdI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S3DiDrwEAAAAAAGzBZh6kVOf4JM9I8iuttUvGupyf5NYkB49ss2eSfZOc0zetSbJv3z7nkCTr++0BAAAAAACW3NZLsM/3J3lOkqclubGq5u4sub619sPW2vVV9cEk76mq76V7CP27k3w5yZl939VJvpLk5Kp6bZLd+j4n9nebAAAAAAAALLmlWNrrJemeUXJWku+MvA4b6fMHSU5N8vEkZye5OclTWmu3JUn//uQk6/rPP973f80SjBcAAAAAAGBeM78jpbVWC+izLsnL+9dQn8uS/MYMhwYAAAAAADCRJXvYPAAAAAAAwEonSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABggSAEAAAAAABgg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+z1eTHNVa+2RrrVXVcUne0C8pc3G6q51uTvLRJGmtXVRVpyc5sape1O/vA0k+3Vr72ib7ctylLaTOquo+6dbaf/7oLbVVdf8kj0ty6Ph+q+op6RL2NenW6D8oyduTfMCapczKNPVbVT+X5LlJPpvuZPcD0z0/4sIkZy90v7BYU9bvTukeRLh9kuelu8tk537b77bWbjP/skSOTXJyv3TGmiQvTHfce0KSVNWHk3y7tXZU3//Pk3yuql6f7pfCpyV5YpLHJMlCjoVhhiaq3345r7elW772m1U1d9XoTa21m6pqxyRvSfKJdCft7pfkHemOK0ZPisCsTFrDb053N+rF6Z6R8op0QcrLFrpPmKFJjyHmrEpyamvte6ON5mA2pb7e7j/StE9/zvfa1tplVXVMkvu01p7ff35CkiOr6tgkJ6Z7+PyqdMuEzjH/TkCQctf01iS/O/Lzhf37QUnO6v/8i+muMp3zp0nunuQvktwjyblJDmmt3TjS57lJ3pvupEmSfCrJkbMcOGTjdbZNuvrdfmy730v34M3V2dCtSV6a7n8Qd0vyjXS35L5/ZqOGzqT1e0u6h2+/MsmOSS5P95yJo1trt02wX5iFSev3gCSP7P/89bF97ZNuyTDzLzPXWjulv9rzTUn2TLI2yaGttUv7Lnsn+fFI/3Oq6vB0z+V5W5L/S3JYa+3ckd0u5FgYFm3S+k03h26b5O/HdnV0upN3tyV5cJLnJ9k13Ym8f0tX4+qXmZuihndNd3HGHkmuT3d+4nGjF8UtYJ8wE1PUb6rqF9JdfHHIPLs0B7MpPSxdfc05tn//UJIj0tX03nMfttYuqapD092V/bIkVyR5RWvtEyN9zL8TqNY8OwYAAAAAAGA+d9vcAwAAAAAAAFiuBCkAAAAAAAADBCkAAAAAAAADBCkAAAAAAAADBCkAAAAAAAADBCkAAAAAAAADBCkAAAAAAAADBCkAAAAAAAADBCkAAAAAAAADBCkAAAAAAAADBCkAAAAAAAADBCkAAAAAAAAD/h8/w6KNV70UbQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 2000x800 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# \n",
    "import matplotlib.pyplot as plt\n",
    "plt.figure(figsize=(20,8),dpi=100)\n",
    "# 显示多少个柱子 bins\n",
    "plt.hist(x=x2,bins=1000)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-0.47746571,  0.81495481,  1.40721735, -0.3114108 ,  0.91826355],\n",
       "       [ 0.03619636, -0.45585402, -1.51461796, -0.84590868,  1.51598865],\n",
       "       [-0.24409251,  0.05924792, -1.11122599,  1.16979526, -0.53175093],\n",
       "       [ 0.80057009, -0.85908903,  1.41863807, -1.02650992, -0.80968626]])"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#形状修改\n",
    "stock_change"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-0.47746571,  0.81495481,  1.40721735, -0.3114108 ],\n",
       "       [ 0.91826355,  0.03619636, -0.45585402, -1.51461796],\n",
       "       [-0.84590868,  1.51598865, -0.24409251,  0.05924792],\n",
       "       [-1.11122599,  1.16979526, -0.53175093,  0.80057009],\n",
       "       [-0.85908903,  1.41863807, -1.02650992, -0.80968626]])"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "stock_change.reshape([5,4])\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "pycharm": {
     "is_executing": false
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-0.47746571,  0.81495481,  1.40721735, -0.3114108 ,  0.91826355,\n",
       "         0.03619636, -0.45585402, -1.51461796, -0.84590868,  1.51598865],\n",
       "       [-0.24409251,  0.05924792, -1.11122599,  1.16979526, -0.53175093,\n",
       "         0.80057009, -0.85908903,  1.41863807, -1.02650992, -0.80968626]])"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 数组的形状被修改为: (2, 10), -1: 表示通过待计算\n",
    "stock_change.reshape([-1,10])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [],
   "source": [
    "# 修改数组本身的形状(前后相同),而reshape是生成新的数组\n",
    "stock_change.resize([5,4])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(5, 4)"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "stock_change\n",
    "stock_change.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-0.47746571,  0.91826355, -0.84590868, -1.11122599, -0.85908903],\n",
       "       [ 0.81495481,  0.03619636,  1.51598865,  1.16979526,  1.41863807],\n",
       "       [ 1.40721735, -0.45585402, -0.24409251, -0.53175093, -1.02650992],\n",
       "       [-0.3114108 , -1.51461796,  0.05924792,  0.80057009, -0.80968626]])"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 生成新数组,行转列,列转行\n",
    "stock_change.T"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-0.47746571,  0.81495481,  1.40721735, -0.3114108 ],\n",
       "       [ 0.91826355,  0.03619636, -0.45585402, -1.51461796],\n",
       "       [-0.84590868,  1.51598865, -0.24409251,  0.05924792],\n",
       "       [-1.11122599,  1.16979526, -0.53175093,  0.80057009],\n",
       "       [-0.85908903,  1.41863807, -1.02650992, -0.80968626]])"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "stock_change"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "dtype('float64')"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 类型修改\n",
    "stock_change.dtype"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "dtype('int32')"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 修改类型后返回新数组\n",
    "arr=stock_change.astype(np.int32)\n",
    "arr.dtype"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "dtype('float64')"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "stock_change.dtype\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "b'\\x01\\x00\\x00\\x00\\x02\\x00\\x00\\x00\\x03\\x00\\x00\\x00\\x04\\x00\\x00\\x00\\x05\\x00\\x00\\x00\\x06\\x00\\x00\\x00\\x0c\\x00\\x00\\x00\\x03\\x00\\x00\\x00\"\\x00\\x00\\x00\\x05\\x00\\x00\\x00\\x06\\x00\\x00\\x00\\x07\\x00\\x00\\x00'"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\n",
    "arr=np.array([[[1, 2, 3], [4, 5, 6]], [[12, 3, 34], [5, 6, 7]]])\n",
    "arr.tostring()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [],
   "source": [
    "temp = np.array([[1, 2, 3, 4],[3, 4, 5, 6]])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1, 2, 3, 4, 5, 6])"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.unique(temp)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-0.47746571,  0.81495481,  1.40721735, -0.3114108 ],\n",
       "       [ 0.91826355,  0.03619636, -0.45585402, -1.51461796],\n",
       "       [-0.84590868,  1.51598865, -0.24409251,  0.05924792],\n",
       "       [-1.11122599,  1.16979526, -0.53175093,  0.80057009],\n",
       "       [-0.85908903,  1.41863807, -1.02650992, -0.80968626]])"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 数组的索引和切片\n",
    "stock_change"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-0.47746571,  0.81495481,  1.40721735],\n",
       "       [ 0.91826355,  0.03619636, -0.45585402],\n",
       "       [-0.84590868,  1.51598865, -0.24409251],\n",
       "       [-1.11122599,  1.16979526, -0.53175093],\n",
       "       [-0.85908903,  1.41863807, -1.02650992]])"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 切割数组,生成新的数组\n",
    "stock_change[:,0:3]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-0.47746571,  0.81495481,  1.40721735])"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "stock_change[0,0:3]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "-0.47746570771170743"
      ]
     },
     "execution_count": 33,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "stock_change[0,0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[1, 2, 3],\n",
       "       [4, 5, 6]])"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 三维数组的索引和切片\n",
    "a1 = np.array([ [[1,2,3],[4,5,6]], [[12,3,34],[5,6,7]]])\n",
    "a1[0,:,:]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[81, 69, 86, 33, 14],\n",
       "       [12, 92, 38, 92, 40],\n",
       "       [19, 49, 94, 42, 79],\n",
       "       [19, 68, 22, 18,  1],\n",
       "       [ 3, 28, 75, 51, 57],\n",
       "       [ 9, 36, 18, 17, 55],\n",
       "       [24, 12, 90, 22, 57],\n",
       "       [76, 54, 99, 60, 18],\n",
       "       [50, 64, 62, 87, 89],\n",
       "       [12, 99, 26, 20, 18]])"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 生成10名同学，5门功课的数据\n",
    "student_scores=np.random.randint(low=0,high=101,size=(10,5),dtype=np.int32)\n",
    "student_scores\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[24, 12, 90, 22, 57],\n",
       "       [76, 54, 99, 60, 18],\n",
       "       [50, 64, 62, 87, 89],\n",
       "       [12, 99, 26, 20, 18]])"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 取出最后4名同学的成绩，用于逻辑判断\n",
    "\n",
    "last_four_scores=student_scores[6:10,:]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ True,  True,  True, False, False],\n",
       "       [False,  True, False,  True, False],\n",
       "       [False, False,  True, False,  True],\n",
       "       [False,  True, False, False, False],\n",
       "       [False, False,  True, False, False],\n",
       "       [False, False, False, False, False],\n",
       "       [False, False,  True, False, False],\n",
       "       [ True, False,  True, False, False],\n",
       "       [False,  True,  True,  True,  True],\n",
       "       [False,  True, False, False, False]])"
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\n",
    "# 逻辑判断, 如果成绩大于60就标记为True 否则为False\n",
    "is_pass=student_scores>60\n",
    "is_pass\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# BOOL赋值, 将满足条件的设置为指定的值-布尔索引\n",
    "student_scores[student_scores>60]=1\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 1,  1,  1, 33, 14],\n",
       "       [12,  1, 38,  1, 40],\n",
       "       [19, 49,  1, 42,  1],\n",
       "       [19,  1, 22, 18,  1],\n",
       "       [ 3, 28,  1, 51, 57],\n",
       "       [ 9, 36, 18, 17, 55],\n",
       "       [24, 12,  1, 22, 57],\n",
       "       [ 1, 54,  1, 60, 18],\n",
       "       [50,  1,  1,  1,  1],\n",
       "       [12,  1, 26, 20, 18]])"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "student_scores\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [],
   "source": [
    "\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.1"
  },
  "pycharm": {
   "stem_cell": {
    "cell_type": "raw",
    "source": [],
    "metadata": {
     "collapsed": false
    }
   }
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
